
#include "u8g2.h"
		
#define uchar unsigned char

typedef struct
{
    uchar current;
    uchar up;
    uchar down;
    uchar enter;
    uchar back;//返回上一级
    void (*current_operation)(void);
} key_table;

typedef enum{
    welcome=0,

    //主界面
    main_listBox,
    main_loading,
    main_switchFile,
    main_systemSettings,
    // main_return,
    main_memformat,
    main_format_dialog,
    main_format_proc,

    //脱机烧录界面
    offlineLoading_fileDeatil,
    offlineLoading_switchFile,
    offlineLoading_systemSettings,
    offlineLoading_return,

    //切换镜像界面
    switchFile_returnMain,

    switchFile_Listbox,
    switchFile_up,
    switchFile_down,

    switchFile_select,
    selectFile_msg_up,
    selectFile_msg_down,
    selectFile_msg_enter,
    selectFile_msg_close,

    //系统设置界面
    common_view,
    loading_followSpeed_view,
    device_view,
    systemSetting_return,

    //文件信息界面
    deatil,

    //普通烧录模式下选择界面
    common_select_common,
    common_select_power,
    common_select_return,

    //电源烧录模式下的选择界面
    power_view,
    power_select_common,
    power_select_power,
    power_select_return,

    //跟随镜像烧录速度模式下的选择界面
    loading_followSpeed_select_follow,
    loading_followSpeed_select_high,
    loading_followSpeed_select_medi,
    loading_followSpeed_select_low,
    loading_followSpeed_select_return,

    //高速烧录下的选择界面
    loading_highSpeed_view,
    loading_highSpeed_select_follow,
    loading_highSpeed_select_high,
    loading_highSpeed_select_medi,
    loading_highSpeed_select_low,
    loading_highSpeed_select_return,

    //中速烧录下的选择界面
    loading_mediSpeed_view,
    loading_mediSpeed_select_follow,
    loading_mediSpeed_select_high,
    loading_mediSpeed_select_medi,
    loading_mediSpeed_select_low,
    loading_mediSpeed_select_return,

    //低速烧录下的选择界面
    loading_lowSpeed_view,
    loading_lowSpeed_select_follow,
    loading_lowSpeed_select_high,
    loading_lowSpeed_select_medi,
    loading_lowSpeed_select_low,
    loading_lowSpeed_select_return,



}menuNumber;





extern key_table table[99];

extern u8g2_t *u8g2;
	
void fun_main_loading(void); 
void fun_main_switchFile(void);  
void fun_main_systemSettings(void);  
void fun_main_memformat(void);
void fun_format_dialog_show(void);
void fun_format_dialog_proc(void);

void fun_offlineLoading_fileDeatil(void); 
void fun_offlineLoading_switchFile(void);  
void fun_offlineLoading_systemSettings(void);  
void fun_offlineLoading_return(void);  

void fun_switchFile_returnMain(void); 
void fun_switchFile_return(void);
void fun_switchFile_ListFile(void);

void fun_switchFile_up(void);
void fun_switchFile_down(void);
void fun_selectFile_msg_show(void);



void fun_selectFile_msg_up(void);
void fun_selectFile_msg_down(void);
void fun_selectFile_msg_enter(void);
void fun_selectFile_msg_close(void);


void fun_switchFile_ok(void);

void fun_common_view(void); 
void fun_loading_followSpeed_view(void);  
void fun_device_view(void);  
void fun_systemSetting_return(void);  

void fun_deatil(void); 

void fun_common_select_common(void);  
void fun_common_select_power(void);  
void fun_common_select_return(void);


void fun_power_view(void);  

void fun_power_select_common(void);
void fun_power_select_power(void); 
void fun_power_select_return(void);  


void fun_loading_followSpeed_select_follow(void); 
void fun_loading_followSpeed_select_high(void); 
void fun_loading_followSpeed_select_medi(void); 
void fun_loading_followSpeed_select_low(void); 
void fun_loading_followSpeed_select_return(void); 

void fun_loading_highSpeed_view(void); 
void fun_loading_highSpeed_select_follow(void); 
void fun_loading_highSpeed_select_high(void); 
void fun_loading_highSpeed_select_medi(void); 
void fun_loading_highSpeed_select_low(void); 
void fun_loading_highSpeed_select_return(void); 


void fun_loading_mediSpeed_view(void); 
void fun_loading_mediSpeed_select_follow(void); 
void fun_loading_mediSpeed_select_high(void); 
void fun_loading_mediSpeed_select_medi(void); 
void fun_loading_mediSpeed_select_low(void); 
void fun_loading_mediSpeed_select_return(void); 

void fun_loading_lowSpeed_view(void); 
void fun_loading_lowSpeed_select_follow(void); 
void fun_loading_lowSpeed_select_high(void); 
void fun_loading_lowSpeed_select_medi(void); 
void fun_loading_lowSpeed_select_low(void); 
void fun_loading_lowSpeed_select_return(void); 



void fun_welcome(void);   
